package database

import (
	"github.com/jinzhu/gorm"
	_ "github.com/mattn/go-sqlite3" //sqlite3
)

var (
	//ORM global Database.
	ORM      *gorm.DB
	database = "sqlite.db"
)

func init() {
	orm, err := gorm.Open("sqlite3", database)
	if err != nil {
		panic("failed to connect database:" + err.Error())
	}
	ORM = orm.Debug().LogMode(true)
}
